
from yolo import YOLO

# ----------------------------------------------------------------------------------------------------------#
#   test_interval       用于指定测量fps的时候，图片检测的次数。理论上test_interval越大，fps越准确。
#   fps_image_path      用于指定测试的fps图片
# ----------------------------------------------------------------------------------------------------------#
test_interval = 100
fps_image_path = "data/pp.jpg"

model = YOLO()

tact_time = model.get_FPS(fps_image_path, test_interval)

print(str(tact_time) + ' seconds/per image')

print(str(1 / tact_time) + ' FPS')
